<template>
  <div class='container'>
    <el-dialog
  :title="pageTitle"
  :visible="dialogShow"
  @close="close"
  width="20%"
  >
 <el-form :model="form" ref="form"  >
  <el-form-item  >
 <el-radio-group v-model="form.chkState">
    <el-radio :label="1">通过</el-radio>
    <el-radio :label="2">拒绝</el-radio>
  </el-radio-group>
    </el-form-item>
  <el-form-item  >
    <el-input placeholder="请输入审核意见" v-model.trim="form.chkRemarks" type="textarea"></el-input>
  </el-form-item>
</el-form>

  <span slot="footer" class="dialog-footer">
    <el-button @click="close">取 消</el-button>
    <el-button type="primary" @click="submit">确 定</el-button>
  </span>
</el-dialog>
  </div>
</template>

<script>
import { choiceCheck } from '@/api/hmmm/questions.js'
export default {
  name: 'QuestionsChk',
  props: ['dialogShow'],
  data () {
    return {
      form: {
        chkState: 1,
        chkRemarks: '',
        id: null
      },
      pageTitle: '题目审核'
    }
  },
  async created () {

  },
  methods: {
    async hanldeEditForm (id) {
      this.form.id = id
    },

    close () {
      this.$refs.form.resetFields()
      this.form.subjectID = ''
      this.$emit('update:dialogShow', false)
    },
    async submit () {
      try {
        await choiceCheck(this.form)
        this.$message.success('操作成功')
        this.close()
        this.$parent.initData()
      } catch (error) {

      }
    }
  }
}
</script>

<style scoped lang='less'>
.dialog-footer{
  margin-left:135px ;
}
</style>
